package com.teemor.im.discovery.node;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
 * @ename zhoulk
 * @cname 周李科
 * @date 2020/6/15 10:18
 */
public class LocalCacheNodeTable {

    private static final Set<ServerNode> remoteNodes = new LinkedHashSet<>();

    private static ServerNode localNode;

    public static void setLocalNode(ServerNode node) {
        localNode = node;
    }

    public static ServerNode getLocalNode() {
        return localNode;
    }

    public static Set<ServerNode> getRemoteNodes() {
        return remoteNodes;
    }

    public static void addRemoteNode(ServerNode node) {
        remoteNodes.add(node);
    }

    public static void removeNode(ServerNode node) {
        remoteNodes.remove(node);
    }

}
